from langchain.llms import OpenAI
from langchain.chat_models import ChatOpenAI
from langchain.chat_models import ErnieBotChat
from langchain.schema import (
    AIMessage,
    HumanMessage,
    SystemMessage
)
import os
from dotenv import load_dotenv,find_dotenv
_ =load_dotenv(find_dotenv());


#  """ openAI 生成模型，用于生成文字

# llm = OpenAI();
# print(llm("欢迎"))


"""问答类模型

chat_model = ChatOpenAI()  # 默认是gpt-3.5-turbo
print(chat_model.predict("你好，欢迎"))
"""
"""
  多轮对话
    AIMessage,     == assistant
    HumanMessage,  == user
    SystemMessage  == system

chat_model = ChatOpenAI()
print(chat_model([HumanMessage(content ="你知道中国哪个皇帝最长寿吗？")]))
"""
# 百度文心一言
# chat_model = ErnieBotChat()
# message = [
#   HumanMessage(content="你是谁")
# ]
# chat_model(message)

